import { Component, toNative } from 'vue-facing-decorator'
import TableRender, { type TableRenderColumnTypes } from '@/render/TableRender'
import type { FilterDto } from '@/render/FilterRender'
import type { VxeGridPropTypes, VxeTableDataRow } from 'vxe-table'

@Component
export class ClientAuditView extends TableRender {

    filterConfig() {
        return {
            companyId: {
                name: '客户名称',
                element: 'select',
                optionsType: 'company'
            },
            applyPeople: {
                name: '申请人',
                element: 'input'
            },
            applyTime: {
                name: '申请时间',
                element: 'datetime',
                type: 'daterange'
            },
        } as FilterDto
    }

    tableColumnConfigOld = () => [
        {
            field: 'companyId',
            title: '客户ID',
        },
        {
            field: 'companyName',
            title: '客户名称',
            width: 200
        },
        {
            field: 'auditStatus',
            title: '是否重复',
        },
        {
            field: 'isOpenPaySalary',
            title: '申请人',
            width: 120
        },
        {
            field: 'isOpenPeriod',
            title: '职位',
            width: 120
        },
        {
            field: 'isOpenWesure',
            title: '申请理由',
            width: 120
        }
    ] as TableRenderColumnTypes<VxeTableDataRow>

    render() {
        return <>
            {super.render()}
        </>
    }
}

export default toNative(ClientAuditView)